// @before-stub-for-debug-begin
#include <vector>
#include <string>
#include "commoncppproblem766.h"

using namespace std;
// @before-stub-for-debug-end

/*
 * @lc app=leetcode.cn id=766 lang=cpp
 *
 * [766] 托普利茨矩阵
 */

// @lc code=start
class Solution {
public:
    bool isToeplitzMatrix(vector<vector<int>>& matrix) {
        int row = matrix.size();
        int col = matrix[0].size();

        int i, j;
        for (i = 0; i < row - 1 ; i++ )
        {
            for (j = 0; j < col - 1;j++)
            {
                if (matrix[i][j] != matrix[i+1][j+1])
                    return false;
            }
        }
        return true;
    }
};
// @lc code=end

